const webpack = require('webpack')
const port = process.env.port || process.env.npm_config_port || 8082 // dev port
module.exports = {
  // productionSourceMap: false,
  publicPath: '/generalTable/',
  // 打包输出路径
  outputDir: 'dist',
  // 打包静态资源输出路径
  assetsDir: 'static',
  productionSourceMap: false,
  devServer: {
    open: true,
    port: port,
    overlay: {
      // 在浏览器不显示编译的警告
      warnings: false,
      // 在浏览器上显示编译的错误
      errors: true
    }
  },
  configureWebpack: {
    plugins: [
      new webpack.ProvidePlugin({
        $: 'jquery',
        jQuery: 'jquery',
        'windows.jQuery': 'jquery'
      })
    ]
  }
}
